package com.linglan.common.enums;

public enum BizCode {
    /**
     * c端系统
     */
    CLT("CLT", UserType.CUSTOMER),
    /**
     * 管理端系统
     */
    MGR("MGR", UserType.MANAGER);

    private final String name;

    private final UserType userType;
    BizCode(String name, UserType userType) {
        this.name = name;
        this.userType = userType;
    }
    public static BizCode getByName(String name) {
        for (BizCode item : BizCode.values()) {
            if (item.getName().equalsIgnoreCase(name)) {
                return item;
            }
        }
        return null;
    }

    public UserType getUserType() {
        return userType;
    }

    public String getName() {
        return name;
    }
}
